<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>添加简历</title>
    <link rel="stylesheet" type="text/css" href="/resource/css/font-awesome.css"/>
    <link rel="stylesheet" type="text/css" href="/resource/css/easyui.css">
    <link rel="stylesheet" type="text/css" href="/resource/css/icon.css">
    <link rel="stylesheet" type="text/css" href="/resource/css/custom.css">
    <link rel="stylesheet" type="text/css" href="/resource/js/datepicker/datepicker.css"/>
    <script type="text/javascript" src="/resource/js/core/jquery.js"></script>
    <script type="text/javascript" src="/resource/js/core/jquery.easyui.153.js"></script>
    <script type="text/javascript" src="/resource/js/core/jquery.ui.core.js"></script>
    <script type="text/javascript" src="/resource/js/core/jquery.ui.effect.js"></script>
    <script type="text/javascript" src="/resource/js/core/common.js"></script>
    <script type="text/javascript" src="/resource/js/core/toolkit.js"></script>
    <script type="text/javascript" src="/resource/js/core/validate.js"></script>
    <script type="text/javascript" src="/resource/js/core/jquery.upload.js"></script>
    <script type="text/javascript" src="/resource/js/datepicker/datepicker.js"></script>
</head>
<body>
<div class="easyui-layout" data-options="fit:true,border:false">
    <div class="div_window_content" data-options="region:'center',border:false" style="margin: 20px;">
        <div class="line">
            <label class="large">姓名</label>
            <input id="addemp_ipt_name" class="easyui-textbox" data-options="required:true,validType:'length[1,30]',invalidMessage:'1~30个字符',width:250"/>
        </div>
        <div class="line">
            <label class="large">性别</label>
            <select id="addemp_ipt_gender" class="easyui-combobox" data-options="required:true,editable:false,width:150">
                <option value="先生">先生</option>
                <option value="女士">女士</option>
            </select>
        </div>
        <div class="line">
            <label class="large">年龄</label>
            <input id="addemp_ipt_age" class="easyui-numberbox" data-options="validType:'length[1,2]',invalidMessage:'不超过2位数字',width:50"/>
        </div>
        <div class="line">
            <label class="large">工作年限</label>
            <input id="addemp_ipt_workAge" class="easyui-numberbox" data-options="validType:'length[1,2]',invalidMessage:'不超过2位数字',width:50"/>
        </div>
        <div class="line">
            <label class="large">联系方式</label>
            <input id="addemp_ipt_phone" class="easyui-textbox" data-options="required:true,validType:'length[1,30]',invalidMessage:'1~30个字符',width:250"/>
        </div>
        <div class="line">
            <label class="large">邮箱</label>
            <input id="addemp_ipt_mail" class="easyui-textbox" data-options="required:true,validType:'email',width:250"/>
        </div>
        <div class="line">
            <label class="large">获取方式</label>
            <select id="addemp_ipt_getType" class="easyui-combobox" data-options="editable:false,width:150">
                <option value="投递">投递</option>
                <option value="搜索">搜索</option>
                <option value="内推">内推</option>
                <option value="外推">外推</option>
            </select>
        </div>
        <div class="line">
            <label class="large">简历来源</label>
            <select id="addemp_ipt_referee" class="easyui-combobox" data-options="editable:false,width:150">
                <option value="拉勾">拉勾</option>
                <option value="51job">51job</option>
                <option value="boss">boss</option>
                <option value="推荐">推荐</option>
            </select>
        </div>
        <div class="line">
            <label class="large">推荐人</label>
            <input id="addemp_ipt_sender" class="easyui-textbox" data-options="validType:'length[0,30]',invalidMessage:'不超过30个字符',width:250"/>
        </div>
        <div class="line">
            <label class="large">备注</label>
            <input id="addemp_ipt_tip" class="easyui-tagbox" data-options="hasDownArrow:true,limitToList:false,multiple:true,width:400">
        </div>
        <div class="line">
            <label class="large">职位</label>
            <input id="addemp_ipt_job" class="easyui-combobox" data-options="required:true,limitToList:true,width:400"/>
        </div>
        <div class="line">
            <label class="large">邀约进度</label>
            <select id="addemp_ipt_inviteStatus" class="easyui-combobox" data-options="required:true,editable:false,width:150">
                <option value="未接听">未接听</option>
                <option value="待答复">待答复</option>
                <option value="已约面">已约面</option>
                <option value="拒绝邀约">拒绝邀约</option>
            </select>
        </div>

        <div class="line">
            <label class="large">约面时间</label>
            <input id="addemp_ipt_interviewTime" class="textbox" readonly="readonly" style="width: 140px; padding: 0 4px;"/>
        </div>
        <div class="line">
            <label class="large">面试方式</label>
            <select id="addemp_ipt_invite" class="easyui-combobox" data-options="required:true,editable:false,width:150">
                <option value="北2楼">北2楼</option>
                <option value="北2茶几">北2茶几</option>
                <option value="北1楼">北1楼</option>
                <option value="电话面试">电话面试</option>
            </select>
        </div>
        <div class="line">
            <label class="large">一面面试官</label>
            <input id="addemp_ipt_interviewer1" class="easyui-combobox" data-options="limitToList:true,width:150"/>
        </div>
        <div class="line">
            <label class="large">二面面试官</label>
            <input id="addemp_ipt_interviewer2" class="easyui-combobox" data-options="limitToList:true,width:150"/>
        </div>
        <div class="line">
            <label class="large">HR面试官</label>
            <input id="addemp_ipt_interviewer0" class="easyui-combobox" data-options="required:true,editable:false,width:150"/>
        </div>
        <div class="line">
            <label class="large">简历文件</label>
            <input id="adad_info_ios_upload_ipt" class="easyui-filebox" name="adad_info_upload" data-id="adad_info_ios_upload" data-options="prompt:'选择需要上传的文件...',width:340">
            <a class="easyui-linkbutton" data-options="iconCls:'icon-upload'" style="float: right; margin-left: 5px;" onclick="jsAdad.upload('ios', $(this));">上传</a>
        </div>
        <div class="line" style="margin-top: 50px;">
            <a class="easyui-linkbutton" data-options="iconCls:'icon-ok',width:80" onclick="jsAdad.saveOrEdit($(this));" style="margin-left:423px;">添  加</a>
        </div>
    </div>
</div>


<script type="text/javascript">
    var JS_ADDEMP = function () {
        var owner = this;
        owner.dom_tag = "addemp_";
        owner.listBoxTag = new Array();
        owner.listBoxJob = new Array();
        $("#" + owner.dom_tag + "ipt_getType").combobox({
            onSelect: function (record) {
                if (record.value == "内推" || record.value == "外推") {
                    $("#" + owner.dom_tag + "ipt_referee").combobox("select", "推荐");
                }
            }
        });
        $("#" + owner.dom_tag + "ipt_tip").tagbox({
            onChange: function () {
                $("#" + owner.dom_tag + "ipt_tip").combobox("loadData", owner.listBoxTag);
                $("#" + owner.dom_tag + "ipt_interviewTime").Zebra_DatePicker({});
            },
            onAddTag: function (value) {
                owner.listBoxTag.push({
                    value: value,
                    text: value
                });
                $("#" + owner.dom_tag + "ipt_tip").combobox("loadData", owner.listBoxTag);
                $.ajax({
                    type: "post",
                    url: "/tag/addTag",
                    cache: false,
                    dataType: "json",
                    data: {
                        type: "default",
                        name: value
                    }
                });
            }
        });

        owner.init = function () {
            $("#" + owner.dom_tag + "ipt_interviewTime").Zebra_DatePicker({});
            owner.loadTagData();
        };

        owner.loadTagData = function () {
            $.ajax({
                type: "get",
                url: "/tag/getNamesByType",
                cache: false,
                dataType: "json",
                data: {
                    type: "default"
                }
            }).done(function (result) {
                if (result.success) {
                    for (var i = 0; i < result.data.length; i++) {
                        owner.listBoxTag.push({
                            value: result.data[i],
                            text: result.data[i]
                        });
                    }
                    $("#" + owner.dom_tag + "ipt_tip").tagbox("loadData", owner.listBoxTag);
                } else {
                    $.messager.alert("提示信息", result.message);
                }
            });
        };

        owner.loadJobData = function () {
            $.ajax({
                type: "get",
                url: "/job/getAllJobs",
                cache: false,
                dataType: "json",
                data: {}
            }).done(function (result) {
                if (result.success) {
                    owner.listBoxJob = result.data;
                    $("#" + owner.dom_tag + "ipt_job").tagbox("loadData", owner.listBoxJob);
                } else {
                    $.messager.alert("提示信息", result.message);
                }
            });
        };



    };


    var jsAddEmp = new JS_ADDEMP();
    jsAddEmp.init();


    /* var jsAdad = new JS_ADAD();
     jsAdad.init();
     jsAdad.getPage(1, 20); */
    // $("html").append('<link rel="stylesheet" type="text/css" href="/resource/css/easyui_pink.css">');
</script>

</body>
</html>



